home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
man
/
cat.n
/
gets.n
< prev
next >
Wrap
Text File
|
1995-07-25
|
2KB
|
67 lines
ggggeeeettttssss((((nnnn)))) TTTTccccllll (((( )))) ggggeeeettttssss((((nnnn))))
_________________________________________________________________
NNNNAAAAMMMMEEEE
gets - Read a line from a file
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ggggeeeettttssss _f_i_l_e_I_d ?_v_a_r_N_a_m_e?
_________________________________________________________________
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
This command reads the next line from the file given by
_f_i_l_e_I_d and discards the terminating newline character. If
_v_a_r_N_a_m_e is specified then the line is placed in the variable
by that name and the return value is a count of the number
of characters read (not including the newline). If the end
of the file is reached before reading any characters then -1
is returned and _v_a_r_N_a_m_e is set to an empty string. If
_v_a_r_N_a_m_e is not specified then the return value will be the
line (minus the newline character) or an empty string if the
end of the file is reached before reading any characters.
An empty string will also be returned if a line contains no
characters except the newline, so eeeeooooffff may have to be used to
determine what really happened. If the last character in
the file is not a newline character then ggggeeeettttssss behaves as if
there were an additional newline character at the end of the
file. _F_i_l_e_I_d must be ssssttttddddiiiinnnn or the return value from a
previous call to ooooppppeeeennnn; it must refer to a file that was
opened for reading. Any existing end-of-file or error |
condition on the file is cleared at the beginning of the |
ggggeeeettttssss command.
KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
file, line, read
Page 1 (printed 7/17/95)